package com.sc.controller.property;

import com.sc.domain.RepClass;
import com.sc.result.Result;
import com.sc.service.RepClassService;
import io.swagger.annotations.Api;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/property/rep-class")
@Api(tags = "维修项目分类管理")
@Slf4j
@RequiredArgsConstructor
public class RepClassController {
private final RepClassService repClassService;
    @GetMapping("/query-all")
    public Result<List<RepClass>> queryAll() {
        log.info("查询维修项目分类");
        List<RepClass> list = repClassService.list();
        return Result.success(list);
    }
}
